<template>
  <div class="w-100 mt-1">
    <div class="flex-1 picture-box-1">
      <div class="flex-1 icon-box row bg-white" v-if="image == '' || image == null">
        <div class="iconfont icon-tupian"></div>
      </div>
      <div class="picture-box flex-1" v-else>
        <img :src="image" class="img"  alt="">
      </div>
    </div>
  </div>
</template>

<script>
  import {
    moduleDetailUrl
  } from "@/utils/clientistration"
  export default {
    data(){
      return{
        image:''
      }
    },
    props:{
      pictureId: {
      	type: Number,
      	default:''
      },
    },
    created() {
      const moduleId = this.pictureId
      this.getModuleDetail(moduleId)
    },
    methods:{
      getModuleDetail(moduleId) {
        this.$get(moduleDetailUrl + moduleId + '/').then(res => {
          this.image = res.data.data.cationDetail[0].image
          this.imageShow = res.data.data.cationDetail[0].image_show
        })
      }
    }
  }
</script>

<style lang="scss">
  .picture-box-1{
    height: 100px;
    border-radius: 10px;
    .icon-box{
      height: 100px;
      border-radius: 10px;
    }
    .icon-tupian{
      font-size: 50px;
      color: #B8B8B8;
    }
    .picture-box{
      height: 100px;
      border-radius: 10px;
      .img {
        width: 100%;
        height: 100px;
        border-radius: 10px;
      }
    }
  }
</style>
